package com.eshop.inventory.model;

import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotNull;

/**
 * @author: Xukai
 * @description: 库存数量model
 * @createDate: 2018/7/23 13:56
 * @modified By:
 */
@Data
public class ProductInventory {

    /**
     * 商品id
     */
    @Id
    @NotNull(message = "商品编号必填")
    private Integer productId;

    /**
     * 库存数量
     */
    @NotNull(message = "商品库存数量必填")
    private Long inventoryCnt;

    public ProductInventory() {
        super();
    }

    public ProductInventory(Integer productId, Long inventoryCnt) {
        this.productId = productId;
        this.inventoryCnt = inventoryCnt;
    }
}
